<template>
	<view class="container">
		<uni-section title="评论" type="line">
			<view style="padding-left: 20px;">{{comments.comment}}</view>
		</uni-section>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				comments: {
					comment: ''
				}
			}
		},
		methods: {

		},
		onLoad(e) {
			uni.request({
				url: 'http://localhost:8090/foodapp/comment/findone',
				method: 'POST',
				data: {
					id: e.id
				},
				success: res => {
					this.comments = res.data.data
					if (res.data.success) {
						uni.showToast({
							title: '成功',
							icon: 'none'
						});
					} else {
						uni.showToast({
							title: '失败',
							icon: 'none'
						});
					}
				}
			})
		}
	}
</script>

<style>
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
</style>
